BINDIR = $(DESTDIR)@BINDIR@
SYSCONF = $(DESTDIR)@SYSCONF@
MANDIR = $(DESTDIR)@MANDIR@
DATADIR = $(DESTDIR)@DATADIR@
ICONDIR = $(DESTDIR)@ICONDIR@

install:
	install -d -m 0755 $(SYSCONF)/xdg/xwm
	install -m 644 example.xwmrc $(SYSCONF)/xdg/xwm/rc.xml
	install -m 755 autostart $(SYSCONF)/xdg/xwm/autostart
	install -d -m 0755 $(DATADIR)/xsessions
	install -m 644 xwm.desktop $(DATADIR)/xsessions/xwm.desktop
	install -d -m 0755 $(MANDIR)/man1
	install -m 644 xwm.1 $(MANDIR)/man1/xwm.1
	install -d -m 0755 $(BINDIR)
	install -m 755 x-file-manager $(BINDIR)/x-file-manager
	install -m 755 x-editor $(BINDIR)/x-editor

uninstall:
	rm -f $(BINDIR)/x-file-manager
	rm -f $(BINDIR)/x-editor
	rm -rf $(SYSCONF)/xdg/xwm
	rm -f $(DATADIR)/xsessions/xwm.desktop
	rm -f $(MANDIR)/man1/xwm.1

clean:
	rm -f xwm.1
